/* $Id: TwoPointsScoreCalculator.java 39 2009-07-24 22:48:06Z h_m_r@gmx.de $ */
package org.jugger.tournament.model.score;

import util.I18N;

/**
 * @author Sven Hamer
 */
public class TwoPointsScoreCalculator extends ScoreCalculator {

	protected int getScore(int points, int pointsOpponent) {
		if(points > pointsOpponent)
			return 2;
		if(points == pointsOpponent)
			return 1;
		return 0;
	}

	@Override
	public String toString() {
		return I18N.__("descriptionTwoPointsScoreCalculator");
	}

	// register in instances table
	static {
		instances.put(TwoPointsScoreCalculator.class, new TwoPointsScoreCalculator());
	}
}
